home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / x / xview / xview3.004 / xview3 / usr / openwin / include / xview_private / charimage.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-29  |  1.1 KB  |  42 lines

  1. /*    @(#)charimage.h 20.14 93/06/28 SMI    */
  2.  
  3. /*
  4.  *    (c) Copyright 1989 Sun Microsystems, Inc. Sun design patents 
  5.  *    pending in the U.S. and foreign countries. See LEGAL NOTICE 
  6.  *    file for terms of the license.
  7.  */
  8.  
  9. /*
  10.  * Definitions relating to maintenance of virtual screen image.
  11.  */
  12.  
  13. /*
  14.  * Screen is maintained as an array of characters.
  15.  * Screen is bottom lines and right columns.
  16.  * Each line has length and array of characters.
  17.  * Characters past length position are undefined.
  18.  * Line is otherwise null terminated.
  19.  */
  20. extern CHAR    **image;
  21. extern char    **screenmode;
  22. extern int    ttysw_top, ttysw_bottom, ttysw_left, ttysw_right;
  23. extern int    cursrow, curscol;
  24.  
  25. #ifdef OW_I18N
  26. #define LINE_LENGTH(line)     (((unsigned char)((unsigned char *)(line))[-1]))
  27. #define       TTY_NON_WCHAR   0xffff
  28. #define       TTY_LINE_INF_INDEX      0x7fffffff
  29. #else
  30. #define LINE_LENGTH(line)    ((unsigned char)((line)[-1]))
  31. #endif
  32.  
  33. #define MODE_CLEAR    0
  34. #define MODE_INVERT    1
  35. #define MODE_UNDERSCORE    2
  36. #define MODE_BOLD    4
  37.  
  38. #define    setlinelength(line, column) \
  39.     { int _col = ((column)>ttysw_right)?ttysw_right:(column); \
  40.       (line)[(_col)] = '\0'; \
  41.       line[-1] = (unsigned char) (_col);}
  42.